
import { type IComponentConfig, ChannelEnum } from '../../types'

const props: IComponentConfig[] = [{
  type: 'dataSource',
  component: 'DataSource',
  label: '数据源',
  model: 'dataSource',
  defaultValue: {
    type: 'static',
    value: [{
      option_key: 'vue',
      option_desc: 'Vue'
    }, {
      option_key: 'react',
      option_desc: 'React'
    }]
  }
}, {
  type: 'switch',
  component: 'eSwitch',
  label: '是否禁用',
  model: 'disabled',
  defaultValue: false
}]

const events: IComponentConfig[] = [{
  type: 'codeEditor',
  component: 'CodeEditor',
  label: 'onChange',
  model: 'on-change',
  defaultValue: `function fn() {
  
}`
}]

const slots: IComponentConfig[] = []

const drag = {
  compName: 'eCheckboxGroup',
  label: '多选框',
  classify: {
    label: '基础',
    value: 'basic'
  },
  channel: ChannelEnum.PC,
  group: {
    label: '表单',
    value: 'form'
  },
  icon: 'icon-checkbox'
}

export default {
  drag,
  props,
  events,
  slots
}
